<extend name="Layout/page_detail" />
<block name="content">
	{:W('PageHeader/simple',array('name'=>'编辑账户','search'=>'N'))}
	<form method='post' id="form_data" name="form_data" enctype="multipart/form-data"   class="well form-horizontal">
		<input type="hidden" id="ajax" name="ajax" value="0">
		<input type="hidden" id="add_file" name="add_file">
		<input type="hidden" id="id" name="id" value="{$vo.id}">
		<input type="hidden" id="opmode" name="opmode" value="edit">
		<div class="form-group col-sm-12">
			<label class="col-sm-2 control-label" for="name">名称：</label>
			<div class="col-sm-10">
				<input class="form-control" type="text" id="name" name="name" check="require" msg="请输入名称" value="{$vo.name}">
			</div>
		</div>
		<div class="form-group col-sm-6">
			<label class="col-sm-4 control-label" for="bank" >开户银行：</label>
			<div class="col-sm-8">
				<input  class="form-control" type="text" id="bank" name="bank" check="require" msg="请输入开户银行" value="{$vo.bank}">
			</div>
		</div>
		<div class="form-group col-sm-6">
			<label class="col-sm-4 control-label" for="no">帐号：</label>
			<div class="col-sm-8">
				<input  class="form-control" type="text" id="no" name="no" check="require" msg="请输入帐号" value="{$vo.no}">
			</div>
		</div>
		<div class="form-group col-sm-6">
			<label class="col-sm-4 control-label" for="init">初始金额：</label>
			<div class="col-sm-8">
				<input type="text" name="init" value="{$vo.init}" readonly="readonly">
			</div>
		</div>
		<div class="form-group col-sm-6">
			<label class="col-sm-4 control-label" for="account_id">当前余额：</label>
			<div class="col-sm-8">
				<input type="text" name="balance" readonly="readonly" value="{$vo.balance}">
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label" for="remark">摘要：</label>
			<div class="col-sm-10">
				<textarea name="remark" rows="4" style="width: 100%;">{$vo.remark}</textarea>
			</div>
		</div>
		<div class="action">
			<input class="btn btn-sm btn-primary" type="button" value="保存" onclick="save();">
			<input class="btn btn-sm btn-default" type="button" value="取消" onclick="go_return_url(1);">
		</div>
	</form>
</block>
<block name="js">
	<script>
		function save() {
			window.onbeforeunload = null;
			if (check_form("form_data")) {
				sendForm("form_data", "{:U('save_account')}","{:U('account_list')}");
			}
		}
	</script>

</block>